package com.ohs.service;

import com.ohs.pojo.Comment;
import com.ohs.utils.ResponseResult;
import com.sun.org.apache.xpath.internal.operations.Mod;
import org.apache.ibatis.annotations.Param;
import org.springframework.ui.Model;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

public interface ITradeService {

    //查找所有购物车的记录
    String findAllShopCar(Model model, HttpSession session);

    //根据购物车Id删除记录
    ResponseResult deleteShopCarByCarId(Integer carId);

    //批量删除
    ResponseResult deleteBatchShopCar(List<Integer> carId);

    //减购物车记录的数量
    ResponseResult modifyQuantity(Integer carId, Integer quantity, Integer productId);

    //生成订单信息绑定到页面
    String toGenerateOrderPage(List<Integer> carId, Model model, HttpSession session);

    //支付后修改订单status为已收货
    ResponseResult updateOrderStatusByUserIdAndProId(Integer userId, Integer proId);

    //查找数据绑定到订单评价页面
    String findReceivedGoods(HttpSession session, Model model);

    //评论并插入
    ResponseResult commentByUserIdAndProId(Integer userId, Integer proId, String comment);

    //评论并插入
    String findCommentByUserId(HttpSession session, Model model);

    //按照commentId查找评论
    ResponseResult findCommentsByCommentId(Integer commentId);

    //修改评论
    ResponseResult updataComments(Integer commentId, String comments);

}
